<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
  <th:block th:include="include :: header('完善项目信息')" />
</head>
<body>
<div class="ibox-content">
  <div class="nav-tabs-custom">
    <ul class="nav nav-tabs">
      <li><a th:href="@{'/project/projectInfo/edit/'+${projectId}}" aria-expanded="false">基本信息</a></li>
      <li><a th:href="@{'/project/projectFlow/edit/'+${projectId}}" aria-expanded="false">工艺处理流程</a></li>
      <li><a th:href="@{'/project/projectFlowParam/'+${projectId}}" aria-expanded="false">工艺处理流程参数</a></li>
      <li><a th:href="@{'/project/projectTech/edit/'+${projectId}}" aria-expanded="false">工艺运行情况</a></li>
      <li class="active"><a th:href="@{'/project/projectEqp/edit/'+${projectId}}" aria-expanded="true">设备运行情况</a></li>
      <li><a th:href="@{'/project/projectWater/edit/'+${projectId}}" aria-expanded="false">水质指标情况</a></li>
      <li><a th:href="@{'/project/projectMicro/edit/'+${projectId}}" aria-expanded="false">菌剂使用情况</a></li>
      <li><a th:href="@{'/project/projectPharm/edit/'+${projectId}}" aria-expanded="false">药剂使用情况</a></li>
    </ul>
    <div class="tab-content">
      <div class="tab-pane active">
        <form class="form-horizontal m" id="form-projectEqp-edit" th:object="${projectEqp}">
          <input name="eqpId" th:field="*{eqpId}"  type="hidden">
          <input name="projectId" th:field="*{projectId}" type="hidden">
          <div class="row">
            <div class="col-sm-4">
              <div class="form-group">
                <label class="col-sm-5 control-label">曝气设备类型：</label>
                <div class="col-sm-7">
                  <select name="aerationEqpType" class="form-control m-b" th:with="type=${@dict.getType('aeration_eqp_type')}">
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{aerationEqpType}"></option>
                  </select>
                </div>
              </div>
            </div>
            <div class="col-sm-4">
              <div class="form-group">
                <label class="col-sm-5 control-label">运行状态：</label>
                <div class="col-sm-7">
                  <select name="aerationRunStatus" class="form-control m-b" th:with="type=${@dict.getType('eqp_run_status')}">
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{aerationRunStatus}"></option>
                  </select>
                </div>
              </div>
            </div>
            <div class="col-sm-4">
              <div class="form-group">
                <label class="col-sm-5 control-label">曝气设备参数：</label>
                <div class="col-sm-6">
                  <input name="aerationEqpFile" type="file" accept="image/*">
                </div>
                <div class="col-sm-1">
                  <div th:if="${projectEqp.aerationEqpUrl != null and projectEqp.aerationEqpUrl != ''}">
                    <img class='img-circle img-xs' data-target='self' th:src="'/abvfile/eqp/'+${projectEqp.aerationEqpUrl}">
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="row">
            <div class="col-sm-4">
              <div class="form-group">
                <label class="col-sm-5 control-label">潜水搅拌设备类型：</label>
                <div class="col-sm-7">
                  <select name="diveEqpType" class="form-control m-b" th:with="type=${@dict.getType('dive_eqp_type')}">
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{diveEqpType}"></option>
                  </select>
                </div>
              </div>
            </div>
            <div class="col-sm-4">
              <div class="form-group">
                <label class="col-sm-5 control-label">运行状态：</label>
                <div class="col-sm-7">
                  <select name="diveRunStatus" class="form-control m-b" th:with="type=${@dict.getType('eqp_run_status')}">
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{diveRunStatus}"></option>
                  </select>
                </div>
              </div>
            </div>
            <div class="col-sm-4">
              <div class="form-group">
                <label class="col-sm-5 control-label">潜水搅拌设备参数：</label>
                <div class="col-sm-6">
                  <input name="diveEqpFile" type="file" accept="image/*">
                </div>
                <div class="col-sm-1">
                  <div th:if="${projectEqp.diveEqpUrl != null and projectEqp.diveEqpUrl != ''}">
                    <img class='img-circle img-xs' data-target='self' th:src="'/abvfile/eqp/'+${projectEqp.diveEqpUrl}">
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="row">
            <div class="col-sm-4">
              <div class="form-group">
                <label class="col-sm-5 control-label">污水回流泵类型：</label>
                <div class="col-sm-7">
                  <select name="sewagePumpType" class="form-control m-b" th:with="type=${@dict.getType('sewage_pump_type')}">
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{sewagePumpType}"></option>
                  </select>
                </div>
              </div>
            </div>
            <div class="col-sm-4">
              <div class="form-group">
                <label class="col-sm-5 control-label">运行状态：</label>
                <div class="col-sm-7">
                  <select name="sewageRunStatus" class="form-control m-b" th:with="type=${@dict.getType('eqp_run_status')}">
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:field="*{sewageRunStatus}" th:value="${dict.dictValue}"></option>
                  </select>
                </div>
              </div>
            </div>
            <div class="col-sm-4">
              <div class="form-group">
                <label class="col-sm-5 control-label">污水回流泵参数：</label>
                <div class="col-sm-6">
                  <input name="sewagePumpFile" type="file" accept="image/*">
                </div>
                <div class="col-sm-1">
                  <div th:if="${projectEqp.sewagePumpUrl != null and projectEqp.sewagePumpUrl != ''}">
                    <img class='img-circle img-xs' data-target='self' th:src="'/abvfile/eqp/'+${projectEqp.sewagePumpUrl}">
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="row">
            <div class="col-sm-4">
              <div class="form-group">
                <label class="col-sm-5 control-label">污泥回流泵类型：</label>
                <div class="col-sm-7">
                  <select name="sludgePumpType" class="form-control m-b" th:with="type=${@dict.getType('sludge_pump_type')}">
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:field="*{sludgePumpType}" th:value="${dict.dictValue}"
                            th:selected="${dict.isDefault == 'Y' ? true : false}"></option>
                  </select>
                </div>
              </div>
            </div>
            <div class="col-sm-4">
              <div class="form-group">
                <label class="col-sm-5 control-label">运行状态：</label>
                <div class="col-sm-7">
                  <select name="sludgeRunStatus" class="form-control m-b" th:with="type=${@dict.getType('eqp_run_status')}">
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:field="*{sludgeRunStatus}"
                            th:value="${dict.dictValue}"></option>
                  </select>
                </div>
              </div>
            </div>
            <div class="col-sm-4">
              <div class="form-group">
                <label class="col-sm-5 control-label">污泥回流泵参数：</label>
                <div class="col-sm-6">
                  <input name="sludgePumpFile" type="file" accept="image/*">
                </div>
                <div class="col-sm-1">
                  <div th:if="${projectEqp.sludgePumpUrl != null and projectEqp.sludgePumpUrl != ''}">
                    <img class='img-circle img-xs' data-target='self' th:src="'/abvfile/eqp/'+${projectEqp.sludgePumpUrl}">
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="row">
            <div class="col-sm-4">
              <div class="form-group">
                <label class="col-sm-5 control-label">气浮机类型：</label>
                <div class="col-sm-7">
                  <select name="airFloatType" class="form-control m-b" th:with="type=${@dict.getType('air_float_type')}">
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:field="*{airFloatType}" th:value="${dict.dictValue}"
                            th:selected="${dict.isDefault == 'Y' ? true : false}"></option>
                  </select>
                </div>
              </div>
            </div>
            <div class="col-sm-4">
              <div class="form-group">
                <label class="col-sm-5 control-label">运行状态：</label>
                <div class="col-sm-7">
                  <select name="airRunStatus" class="form-control m-b" th:with="type=${@dict.getType('eqp_run_status')}">
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:field="*{airRunStatus}" th:value="${dict.dictValue}"></option>
                  </select>
                </div>
              </div>
            </div>
            <div class="col-sm-4">
              <div class="form-group">
                <label class="col-sm-5 control-label">气浮机参数：</label>
                <div class="col-sm-6">
                  <input name="airFloatFile" type="file" accept="image/*">
                </div>
                <div class="col-sm-1">
                  <div th:if="${projectEqp.airFloatUrl != null and projectEqp.airFloatUrl != ''}">
                    <img class='img-circle img-xs' data-target='self' th:src="'/abvfile/eqp/'+${projectEqp.airFloatUrl}">
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="row">
            <div class="col-sm-4">
              <div class="form-group">
                <label class="col-sm-5 control-label">MBR膜类型：</label>
                <div class="col-sm-7">
                  <select name="mbrMemType" class="form-control m-b" th:with="type=${@dict.getType('mbr_mem_type')}">
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:field="*{mbrMemType}" th:value="${dict.dictValue}"
                            th:selected="${dict.isDefault == 'Y' ? true : false}"></option>
                  </select>
                </div>
              </div>
            </div>
            <div class="col-sm-4">
              <div class="form-group">
                <label class="col-sm-5 control-label">运行状态：</label>
                <div class="col-sm-7">
                  <select name="mbrRunStatus" class="form-control m-b" th:with="type=${@dict.getType('eqp_run_status')}">
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:field="*{mbrRunStatus}" th:value="${dict.dictValue}"></option>
                  </select>
                </div>
              </div>
            </div>
            <div class="col-sm-4">
              <div class="form-group">
                <label class="col-sm-5 control-label">MBR膜参数：</label>
                <div class="col-sm-6">
                  <input name="mbrMemFile" type="file" accept="image/*">
                </div>
                <div class="col-sm-1">
                  <div th:if="${projectEqp.mbrMemUrl != null and projectEqp.mbrMemUrl != ''}">
                    <img class='img-circle img-xs' data-target='self' th:src="'/abvfile/eqp/'+${projectEqp.mbrMemUrl}">
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="row">
            <div class="col-sm-4">
              <div class="form-group">
                <label class="col-sm-5 control-label">其他设备类型：</label>
                <div class="col-sm-7">
                  <input name="otherEqpType" class="form-control" type="text" th:field="*{otherEqpType}" maxlength="20">
                </div>
              </div>
            </div>
            <div class="col-sm-4">
              <div class="form-group">
                <label class="col-sm-5 control-label">运行状态：</label>
                <div class="col-sm-7">
                  <select name="otherRunStatus" class="form-control m-b" th:with="type=${@dict.getType('eqp_run_status')}">
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:field="*{otherRunStatus}"
                            th:value="${dict.dictValue}"></option>
                  </select>
                </div>
              </div>
            </div>
            <div class="col-sm-4">
              <div class="form-group">
                <label class="col-sm-5 control-label">其他设备参数：</label>
                <div class="col-sm-6">
                  <input name="otherEqpFile" type="file" accept="image/*">
                </div>
                <div class="col-sm-1">
                  <div th:if="${projectEqp.otherEqpUrl != null and projectEqp.otherEqpUrl != ''}">
                    <img class='img-circle img-xs' data-target='self' th:src="'/abvfile/eqp/'+${projectEqp.sludgePumpUrl}">
                  </div>
                </div>
              </div>
            </div>
          </div>
        </form>
      </div>
      <div class="row">
        <div class="col-sm-offset-5 col-sm-10">
          <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp;
          <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
        </div>
      </div>
    </div>
  </div>
</div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
  var prefix = ctx + "project/projectEqp";
  $("#form-projectEqp-edit").validate({
    focusCleanup: true
  });

  function submitHandler() {
    if ($.validate.form()) {
      var data = new FormData($("#form-projectEqp-edit")[0]);
      $.ajax({
        url: prefix + "/edit",
        type: "post",
        data: data,
        cache: false,
        processData: false,
        contentType: false,
        success: function(result) {
          if (result.code == web_status.SUCCESS) {
            layer.msg(result.msg, { icon: $.modal.icon(modal_status.SUCCESS), time: 1000},function() {
              location.reload();
            });
          } else if (result.code == web_status.WARNING) {
            $.modal.msgWarning(result.msg)
          } else {
            $.modal.msgError(result.msg);
          }
          $.modal.closeLoading();
        }
      });
    }
  }
  $.form.imgView("#form-projectEqp-edit");
</script>
</body>
</html>